﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;


namespace zuoyuexiangmu
{
    public partial class wjmm : Form
    {
        public wjmm()
        {
            InitializeComponent();
        }

        private void label3_Click(object sender, EventArgs e)
        {

        }
        string ver = string.Empty;
        private void re() 
        {
            VerifyCodeImgSimple code = new VerifyCodeImgSimple();
            ver = code.GreateVerifyCode(5);
            pictureBox1.Image = code.GreateImage(ver,15,"楷体",Color.Blue,Color.White);
        }
        private void wjmm_Load(object sender, EventArgs e)
        {
            re();
        }

        private void pictureBox1_Click(object sender, EventArgs e)
        {
            re();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            string yzm = textBox4.Text;
            if (ver.ToUpper()!=yzm.ToUpper())
            {
                MessageBox.Show("验证码输入错误");
                textBox4.Text = "";
                re();
            }
            else
            {
                MessageBox.Show("验证码输入正确");
                textBox4.Text = "";
                re();
            }

        }
     
    }
}
